/*
 * GXT310.h
 *
 *  Created on: 2025年7月4日
 *      Author: 黄少杰
 */

#ifndef __GXT310_H
#define __GXT310_H
#include "hal_data.h"
#define I2C_SCL    BSP_IO_PORT_00_PIN_14    //IIC1  BSP_IO_PORT_00_PIN_14
#define I2C_SDA    BSP_IO_PORT_00_PIN_15    //PB11  BSP_IO_PORT_00_PIN_15

#define I2C_SCL_H  R_IOPORT_PinWrite(&g_ioport_ctrl, I2C_SCL, 1);
#define I2C_SCL_L  R_IOPORT_PinWrite(&g_ioport_ctrl, I2C_SCL, 0);

#define I2C_SDA_H  R_IOPORT_PinWrite(&g_ioport_ctrl, I2C_SDA, 1);
#define I2C_SDA_L  R_IOPORT_PinWrite(&g_ioport_ctrl, I2C_SDA, 0);

extern float Temperature1;

void I2C_INIT(void);
void GXT310_read_result1(uint8_t addr);

#endif
